package luogu;

import java.util.Scanner;

public class Main17 {

        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);

            // 读取三个点的坐标
            double x1 = scanner.nextDouble();
            double y1 = scanner.nextDouble();
            scanner.nextLine(); // 消耗换行符

            double x2 = scanner.nextDouble();
            double y2 = scanner.nextDouble();
            scanner.nextLine();

            double x3 = scanner.nextDouble();
            double y3 = scanner.nextDouble();

            // 计算三条边的长度
            double side1 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
            double side2 = Math.sqrt(Math.pow(x3 - x2, 2) + Math.pow(y3 - y2, 2));
            double side3 = Math.sqrt(Math.pow(x1 - x3, 2) + Math.pow(y1 - y3, 2));

            // 计算周长并保留两位小数
            double c = side1 + side2 + side3;
            System.out.printf("%.2f", c);
        }
    }

